package com.ihr360.payroll.model.dto.salary.demo;

import com.ihr360.commons.model.entity.NumberIdWithTimeAndCompanyId;
import com.ihr360.payroll.model.dto.staff.embeddable.SalaryProfileItemsWrapper;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Type;

import javax.persistence.Column;
import javax.persistence.Entity;

/**
 * 工资表示例数据
 */

@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
@Entity
public class PayrollConfigDemo extends NumberIdWithTimeAndCompanyId<Long> {

    @Column(length = 40, nullable = false)
    private String name;

    @Column(length = 128)
    private String departmentName;

    @Column(length = 100)
    private String positionName;
    //目前只支持有一条生效记录
    @Column
    private Boolean effective = true;


    @Column(columnDefinition = "text", name = "wrapper")
    @Type(type = "json")
    private SalaryProfileItemsWrapper wrapper;

}
